<template>
	<el-menu-item-group>
		<el-menu-item
			v-for="item in listChildren"
			:key="item.id"
			:index="/home/ + item.path"
			@click="add(`/home/${item.path}`)"
			class="orange"
		>
			<template slot="title">
				<i class="el-icon-menu"></i>
				<span>{{ item.authName }}</span>
			</template>
		</el-menu-item>
	</el-menu-item-group>
</template>

<script>
export default {
	name: 'MenuChildren',
	props: ['listChildren'],
	methods: {
		add(data) {
			this.$bus.$emit('add', data)
		},
	},
}
</script>

<style scoped>
i {
	margin-right: 7px;
}
.orange:hover {
	color: orange !important;
}
</style>
